import request from '@/utils/request'

// 获取AI专家列表
export function fetchExpertList(params) {
  return request({
    url: '/api/expert/list',
    method: 'get',
    params
  })
}

// 创建AI专家
export function createExpert(data) {
  return request({
    url: '/api/expert/create',
    method: 'post',
    data
  })
}

// 更新AI专家
export function updateExpert(data) {
  return request({
    url: '/api/expert/update',
    method: 'put',
    data
  })
}

// 删除AI专家
export function deleteExpert(id) {
  return request({
    url: `/api/expert/delete/${id}`,
    method: 'delete'
  })
}

// 启用AI专家
export function enableExpert(id) {
  return request({
    url: `/api/expert/enable/${id}`,
    method: 'post'
  })
}

// 禁用AI专家
export function disableExpert(id) {
  return request({
    url: `/api/expert/disable/${id}`,
    method: 'post'
  })
}

// 获取专家详情
export function getExpertDetail(id) {
  return request({
    url: `/api/expert/detail/${id}`,
    method: 'get'
  })
}

// 获取专家统计
export function getExpertStats() {
  return request({
    url: '/api/expert/stats',
    method: 'get'
  })
}
